home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
gui4cli
/
docs
/
tutorials
/
lvstyles.gc
< prev
next >
Wrap
Text File
|
1999-05-14
|
3KB
|
88 lines
G4C
; A window with a listview which shows the file we create on the fly
; below, showing some of the control sequences you can use
; ======================================================================
TEXTFILE T:SampleText
==== ESCAPE Sequences in ListViews -------------------------
All control sequences start with the 2 characters <ESC> and
'['. To enter an ESCAPE character into your text you need a
text editor such as CygnusEd or others. Escape sequences end
with the 'm' character. If you need to give many sequences,
you can separate them with ';'
==== Simple sequences -------------------------------------
<ESC>[0m - Will clear all settings
<ESC>[1m - Set Bold
<ESC>[2m - Set Faint
<ESC>[3m - Set Italic
<ESC>[4m - Set Underline
<ESC>[7m - Reverse foreground<->background colors
Or you can combine them :
<ESC>1;3;4m - Set Bold, Italic & Underline
==== Colored Text ------------------------------------------
For colored text, you give "3" and then the number of the
color you want (0-7).
<ESC>[32m - Set white color
<ESC>[33m - Set colors No 3
Or combine it with other sequences :
<ESC>[32;3;4m - Set White, Italic and Underline
To set the background or cell color, you give a ">" and the
color number
>2m <ESC>[>2m - Set the background to color 2 (white)
==== 3D Text rendering -------------------------------------
To get a 3D effect you give an "8". This is suposed to be the
"concealed" mode actually, but Gui4Cli renders it as 3D.
<ESC>[8m - This is 3D text. You can set the colors..
<ESC>[32;8m - White on black 3D text (Looks better)
<ESC>[33;8m - Color 3 on black 3D text
>2;8m<ESC>[32;>2;8m - Set foreground and background
Or - you guessed it - combine it with others :
<ESC>[32;8;3;4m - Underlined, Italic, White 3D text
8;3;4;>1m <ESC>[32;8;3;4;>1m - Set the background too..
### ; End of file
; ======================================================================
; This is where the actual gui starts..
; Globals & system events
; ======================================================================
WINBIG -1 -1 476 213 "Escape codes you can use in listviews."
WinType 11110001
xOnLoad
guiopen lvstyles.gc
xOnClose
guiquit lvstyles.gc
; ======================================================================
; The listview
; ======================================================================
XLISTVIEW 0 0 0 0 "" var T:SampleText 5 NUM
GadID 1
ATTR lvlinedist 2 ; Set the distance between lines to 2 pixels